package com.xs.ahoi.hcxs.ui.dialog;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import butterknife.OnClick;
import com.xs.ahoi.hcxs.R;

/**
 * 书架页面右上角点击更多弹框
 */
public class DialogShelfMore extends BaseBubbleDialog {

    private DialogListener dialogListener;

    @Override
    public View getLayout() {
        return LayoutInflater.from(getContext()).inflate(R.layout.dialog_shelf_more, null);
    }

    public DialogShelfMore(Context context) {
        super(context);
        calBar(true);
    }

    @OnClick({R.id.importLocal, R.id.batchManage})
    public void onClick(View v) {
        String url = "http://www.getyfree.com/wp-content/uploads/2013/06/Fre-download-Adobe-Premiere-Pro.png";
        switch (v.getId()) {
            case R.id.importLocal:
                dialogListener.importLocal();
                dismiss();
                break;
            case R.id.batchManage:
                dialogListener.batchManage();
                dismiss();
                break;
        }
    }

    public void setDialogListener(DialogListener dialogListener) {
        this.dialogListener = dialogListener;
    }

    public interface DialogListener {
        void importLocal();

        void batchManage();
    }
}